package com.ssy.lingxi.after.sale.repository;

import com.ssy.lingxi.after.sale.entity.OuterWorkflowRecordDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 售后外部工作流记录
 * @author 伍将
 * @date 2020/9/2
 * @version 2.0.0
 */
public interface OuterWorkflowRecordRepository extends JpaRepository<OuterWorkflowRecordDO, Long>, JpaSpecificationExecutor<OuterWorkflowRecordDO> {

    /**
     * 根据售后id与售后类型获取售后外部工作流记录并按操作时间顺序排序
     * @author 伍将
     * @date 2020/9/3
     * @param afterSaleId:
     * @param afterSaleType:
     * @return java.util.List<com.ssy.lingxi.after.sale.entity.InnerWorkflowRecordDO>
     **/
    List<OuterWorkflowRecordDO> findByAfterSaleIdAndAfterSaleTypeOrderByOperateTimeAsc(Long afterSaleId, Integer afterSaleType);
}
